Skip to content

fix(nextcloud): truly not require SSE-C - #643

Closed
jstewart612 wants to merge 0 commit into
nextcloud:mainfrom
thecrimsontint:main
Closed

fix(nextcloud): truly not require SSE-C#643
jstewart612 wants to merge 0 commit into
nextcloud:mainfrom
thecrimsontint:main

Conversation

@jstewart612

@jstewart612 jstewart612 commented Oct 6, 2024

Copy link
Copy Markdown

Description of the change

Make SSE-C truly not be required just as the upstream project does not require SSE-C.

Benefits

Make SSE-C truly not be required just as the upstream project does not require SSE-C.

Possible drawbacks

None: only makes Helm chart more compliant with available upstream options.

Applicable issues

Additional information

Checklist

@jessebot jessebot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, can be uncomplicated just a bit though :)

key: {{ .Values.nextcloud.objectStore.s3.secretKeys.sse_c_key }}
{{- else }}
{{- end }}
{{- if and (gt (len .Values.nextcloud.objectStore.s3.sse_c_key) 0) (lt (len .Values.nextcloud.objectStore.s3.secretKeys.sse_c_key) 1) }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{- if and (gt (len .Values.nextcloud.objectStore.s3.sse_c_key) 0) (lt (len .Values.nextcloud.objectStore.s3.secretKeys.sse_c_key) 1) }}
{{- if .Values.nextcloud.objectStore.s3.sse_c_key }}

We don't actually need to calculate the length, as if this is not an empty string, it will trigger. My above suggestion should work fine.

@jessebot jessebot added 2. developing Work in progress S3 Anything to do with S3 object storage labels Oct 21, 2024

@wrenix wrenix left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the change, you should rebase and fix the version dump.

{{- if and (gt (len .Values.nextcloud.objectStore.s3.sse_c_key) 0) (lt (len .Values.nextcloud.objectStore.s3.secretKeys.sse_c_key) 1) }}
- name: OBJECTSTORE_S3_SSE_C_KEY
value: {{ .Values.nextcloud.objectStore.s3.sse_c_key | quote }}
{{- end }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the order of evaluote first if sse_c_key is set (and then existingSecret) so that we has the name: OBJECTSTORE_S3_SSE_C_KEY just once and.
It is for me better readable (maybe we change the idea of if and with) ...

Suggested change
{{- end }}
{{- with .Values.nextcloud.objectStore.s3.sse_c_key }}
- name: OBJECTSTORE_S3_SSE_C_KEY
{{- if $.Values.nextcloud.objectStore.s3.existingSecret }}
valueFrom:
secretKeyRef:
name: {{ $.Values.nextcloud.objectStore.s3.existingSecret }}
key: {{ . | quote }}
{{- else }}
value: {{ . | quote }}
{{- end }}
{{- end }}

@wrenix
wrenix marked this pull request as draft March 6, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress S3 Anything to do with S3 object storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants